//
//  SecurityStatisticsTopHeaderView.swift
//  SBSafetyApp
//
//  Created by Lina on 2023/5/25.
//

import Foundation
import UIKit

class SecurityStatisticsTopHeaderView: UIView {
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    // MARK: - Setup

    func setupUI() {
        addSubview(managerPanel)
        managerPanel.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(10)
            make.left.equalToSuperview()
            make.right.equalToSuperview()
        }
        
        addSubview(taskPanel)
        taskPanel.snp.makeConstraints { make in
            make.top.equalTo(managerPanel.snp.bottom).offset(10)
            make.left.equalToSuperview()
            make.right.equalToSuperview()
        }
        
        addSubview(attView)
        attView.snp.makeConstraints { make in
            make.top.equalTo(taskPanel.snp.bottom).offset(10)
            make.left.equalToSuperview()
            make.right.equalToSuperview()
            make.bottom.equalToSuperview()
        }
    }
    
    lazy var managerPanel: SecurityManagerPanel = {
        let view = SecurityManagerPanel()
        return view
    }()
    
    lazy var taskPanel: SecurityTaskPanel = {
        let view = SecurityTaskPanel()
        return view
    }()
    
    lazy var attView: SecurityAttendancePanel = {
        let view = SecurityAttendancePanel()
        return view
    }()
}
